dic = {"John":"123","Marry":"111","Tommy":"123456"}
usrname = input()
if usrname in dic:
    passwd = input()
    if passwd == dic[usrname]:
        print("成功登录")
    else:
        print("密码不正确")
else:
    print("该用户不存在")
